# num = input("Enter a number: ")
# if int(num) < 10:
# #     print("Small")
# num = input("Enter a number: ")
# print(num if int(num) < 19 else 'Large')
score = int(input())
if score < 60:
    print('D')
elif score <80:
    print('C')
elif score < 90:
    print('B')
else:
    print('A')